package com.tiancheng.trade.payment.mapper;

import com.tiancheng.trade.payment.model.SettleDetail;
import com.tiancheng.trade.payment.task.ums.bo.SettleDetailBo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author kellen
 * @date 2024-12-09 17:01
 */
@Repository
public interface SettleDetailMapper extends TYBaseMapper<SettleDetail> {
    /**
     * 批量插入
     *
     * @param details
     * @return
     */
    int insertBatch(@Param("list") List<SettleDetail> details);

    /**
     * 根据id、apprFileName、apprId、distFileName、distId组合条件批量更新
     *
     * @param submitBOS
     * @return
     */
    int updateBatch(@Param("list") List<SettleDetailBo> submitBOS);

    /**
     * 根据划付id更新流水状态
     *
     * @param apprIds
     * @return
     */
    int updatePayFlowBatch(@Param("list") List<String> apprIds, @Param("settleStatus") String settleStatus);

    int updatePayFlowBatchError(@Param("list") List<String> apprIds);

    /**
     * 根据划付id更新退款流水状态
     *
     * @param apprIds
     * @param settleStatus
     * @return
     */
    void updateRefundFlowBatch(@Param("list") List<String> apprIds, @Param("settleStatus") String settleStatus);
    void updateRefundFlowBatchError(@Param("list") List<String> apprIds);
}
